﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Silverlight_Client.Commands_Utils;
using System.Collections.ObjectModel;

namespace Silverlight_Client.ViewModels
{
    public class RegistrationPageVM : IViewModelBase
    {
        #region Fields
        
        private String                          _answer, _email, _password;
        private ICommand                        _cancelcmd, _registercmd;
        private ObservableCollection<String>    _questions;

        #endregion

        #region Properties

        public String Answer
        {
            get { return _answer; }
            set
            {
                if (_answer == value) return;
                _answer = value;
                RaisePropertyChanged("Answer");
            }
        }
        public String Email
        {
            get { return _email; }
            set
            {
                if (_email == value) return;
                _email = value;
                RaisePropertyChanged("Email");
            }
        }
        public String Password
        {
            get { return _password; }
            set
            {
                if (_password == value) return;
                _password = value;
                RaisePropertyChanged("Password");
            }
        }
        public ObservableCollection<String> Questions
        {
            get { return _questions; }
            set
            {
                if (_questions == value) return;
                _questions = value;
                RaisePropertyChanged("Questions");
            }
        }

        #endregion

        #region Commands

        private ICommand CancelCmd
        {
            get { return _cancelcmd; }
        }
        private ICommand RegisterCmd
        {
            get { return _registercmd; }
        }

        #endregion

        #region Commands Functions

        private void CancelFunc()
        {
        }
        private void RegisterFunc()
        {
        }

        #endregion

        #region Functions
        

        #endregion

        #region Ctor

        public RegistrationPageVM()
        {
            _answer = _email = _password = String.Empty;
            _cancelcmd = new RelayCommand(CancelFunc) { IsEnabled = true };
            _registercmd = new RelayCommand(RegisterFunc) { IsEnabled = true };
            _questions = new ObservableCollection<string>();
        }

        #endregion
    }
}
